#define _CRT_SECURE_NO_WARNINGS 1.
#include<stdio.h>
#include<stdlib.h>
typedef int SLTDateType;
typedef struct Node {
    SLTDateType data;
    struct Node* next;
} Node;
void SlistPushBank(int p, Node** phead) {
    Node* x;
    Node* tmp = *phead;
    x = (Node*)malloc(sizeof(Node));
    if (tmp == NULL) {
        *phead = x;
        x->data = p;
        x->next = NULL;
        return;
    }
    while (tmp->next != NULL) {
        tmp = tmp->next;
    }
    tmp->next = x;
    x->data = p;
    x->next = NULL;
}
void SlistPrint(Node* Phead) {
    Node* p = Phead;
    while (p != NULL) {
        printf("%d", p->data);
        p = p->next;
    }
}

int main() {
    int i;
    scanf("%d", &i);
    int arr[1000];
    Node* n = NULL;
    for (int x = 0; x < i; x++) {
        scanf("%d ", &arr[x]);
        SlistPushBank(arr[x], &n);
    }
    SlistPrint(&n);
}